from turbogears import testutil
from kaizen.controllers import Root
from kaizen import model
import cherrypy
import logging

log = logging.getLogger("kaizen.tests.test_controllers")

cherrypy.root = Root()
cherrypy.config.update({"sqlalchemy.dburi" : "sqlite:///:memory:"})
cherrypy.config.update({'sessionFilter.on': True})
cherrypy.config.update({'tg.defaultview' : "genshi"})
cherrypy.config.update({'level':"DEBUG"})
cherrypy.config.update({'qualname':"kaizen"})
cherrypy.config.update({'handlers':['debug_out']})

class BaseTest:

    def setUp(self):
        # a 'dummy' call to initialize the database
        testutil.create_request('/')
        model.create()

    def tearDown(self):
        model.drop()
